<?php

namespace Iaem\UserBundle\Entity;

use Doctrine\Common\Collections\ArrayCollection;
use Doctrine\ORM\Mapping as ORM;
use Symfony\Component\Security\Core\Role\Role;
use Symfony\Component\Security\Core\User\UserInterface;
use FOS\UserBundle\Model\User as BaseUser;

/**
 * User
 *
 * @ORM\Table(name="users")
 * @ORM\Entity
 */
class User extends BaseUser
{
    /**
     * @ORM\Id
     * @ORM\Column(type="integer")
     * @ORM\GeneratedValue(strategy="AUTO")
     */
    protected $id;

    /**
     * @var ArrayCollection
     *
     * @ORM\OneToMany(targetEntity="Iaem\HomeBundle\Entity\Vote", mappedBy="user")
     */
    private $votes;

    /**
     * @var \DateTime
     *
     * @ORM\Column(name="lastVotedTime", type="datetime", nullable=true)
     */
    private $lastVotedTime;

    /** @ORM\Column(name="facebook_id", type="string", length=255, nullable=true) */
    protected $facebook_id;

    /** @ORM\Column(name="facebook_access_token", type="string", length=255, nullable=true) */
    protected $facebook_access_token;

    /** @ORM\Column(name="google_id", type="string", length=255, nullable=true) */
    protected $google_id;

    /** @ORM\Column(name="google_access_token", type="string", length=255, nullable=true) */
    protected $google_access_token;

    /** @ORM\Column(name="twitter_id", type="string", length=255, nullable=true) */
    protected $twitter_id;

    /** @ORM\Column(name="twitter_access_token", type="string", length=255, nullable=true) */
    protected $twitter_access_token;

    /** @ORM\Column(name="vkontakte_id", type="string", length=255, nullable=true) */
    protected $vkontakte_id;

    /** @ORM\Column(name="vkontakte_access_token", type="string", length=255, nullable=true) */
    protected $vkontakte_access_token;

    /** @ORM\Column(name="odnoklassniki_id", type="string", length=255, nullable=true) */
    protected $odnoklassniki_id;

    /** @ORM\Column(name="odnoklassniki_access_token", type="string", length=255, nullable=true) */
    protected $odnoklassniki_access_token;

    /** @ORM\Column(name="firstName", type="string", length=255, nullable=true) */
    protected $firstName;

    /** @ORM\Column(name="lastName", type="string", length=255, nullable=true) */
    protected $lastName;

    /** @ORM\Column(name="device_id", type="string", length=255, nullable=true) */
    protected $device_id;

    /** @ORM\Column(name="device_access_token", type="string", length=255, nullable=true) */
    protected $device_access_token;

    public function __construct()
    {
        parent::__construct();
    }

    /**
     * @return mixed
     */
    public function getId()
    {
        return $this->id;
    }

    /**
     * @param  $vote
     * @return User
     */
    public function addVote($vote)
    {
        $this->votes->add($vote);
        return $this;
    }

    /**
     * @return \Doctrine\Common\Collections\ArrayCollection
     */
    public function getVotes()
    {
        return $this->votes;
    }

    /**
     * @param mixed $facebook_access_token
     * @return User
     */
    public function setFacebookAccessToken($facebook_access_token)
    {
        $this->facebook_access_token = $facebook_access_token;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getFacebookAccessToken()
    {
        return $this->facebook_access_token;
    }

    /**
     * @param mixed $facebook_id
     * @return User
     */
    public function setFacebookId($facebook_id)
    {
        $this->facebook_id = $facebook_id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getFacebookId()
    {
        return $this->facebook_id;
    }

    /**
     * @param mixed $google_access_token
     * @return User
     */
    public function setGoogleAccessToken($google_access_token)
    {
        $this->google_access_token = $google_access_token;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getGoogleAccessToken()
    {
        return $this->google_access_token;
    }

    /**
     * @param mixed $google_id
     * @return User
     */
    public function setGoogleId($google_id)
    {
        $this->google_id = $google_id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getGoogleId()
    {
        return $this->google_id;
    }

    /**
     * @param mixed $twitter_access_token
     * @return User
     */
    public function setTwitterAccessToken($twitter_access_token)
    {
        $this->twitter_access_token = $twitter_access_token;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getTwitterAccessToken()
    {
        return $this->twitter_access_token;
    }

    /**
     * @param mixed $twitter_id
     * @return User
     */
    public function setTwitterId($twitter_id)
    {
        $this->twitter_id = $twitter_id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getTwitterId()
    {
        return $this->twitter_id;
    }

    /**
     * @param \DateTime $lastVotedTime
     * @return User
     */
    public function setLastVotedTime($lastVotedTime)
    {
        $this->lastVotedTime = $lastVotedTime;
        return $this;
    }

    /**
     * @return \DateTime
     */
    public function getLastVotedTime()
    {
        return $this->lastVotedTime;
    }

    /**
     * @param mixed $vkontakte_access_token
     * @return User
     */
    public function setVkontakteAccessToken($vkontakte_access_token)
    {
        $this->vkontakte_access_token = $vkontakte_access_token;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getVkontakteAccessToken()
    {
        return $this->vkontakte_access_token;
    }

    /**
     * @param mixed $vkontakte_id
     * @return User
     */
    public function setVkontakteId($vkontakte_id)
    {
        $this->vkontakte_id = $vkontakte_id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getVkontakteId()
    {
        return $this->vkontakte_id;
    }

    /**
     * @param mixed $odnoklassniki_access_token
     * @return User
     */
    public function setOdnoklassnikiAccessToken($odnoklassniki_access_token)
    {
        $this->odnoklassniki_access_token = $odnoklassniki_access_token;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getOdnoklassnikiAccessToken()
    {
        return $this->odnoklassniki_access_token;
    }

    /**
     * @param mixed $odnoklassniki_id
     * @return User
     */
    public function setOdnoklassnikiId($odnoklassniki_id)
    {
        $this->odnoklassniki_id = $odnoklassniki_id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getOdnoklassnikiId()
    {
        return $this->odnoklassniki_id;
    }

    /**
     * @param mixed $firstName
     * @return User
     */
    public function setFirstName($firstName)
    {
        $this->firstName = $firstName;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getFirstName()
    {
        return $this->firstName;
    }

    /**
     * @param mixed $lastName
     * @return User
     */
    public function setLastName($lastName)
    {
        $this->lastName = $lastName;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getLastName()
    {
        return $this->lastName;
    }

    /**
     * @param mixed $device_access_token
     * @return User
     */
    public function setDeviceAccessToken($device_access_token)
    {
        $this->device_access_token = $device_access_token;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getDeviceAccessToken()
    {
        return $this->device_access_token;
    }

    /**
     * @param mixed $device_id
     * @return User
     */
    public function setDeviceId($device_id)
    {
        $this->device_id = $device_id;
        return $this;
    }

    /**
     * @return mixed
     */
    public function getDeviceId()
    {
        return $this->device_id;
    }


}
